/**
 * API配置文件
 */
const hostConfig = require('../../static/data/host.json')
let context = hostConfig && hostConfig.context ? `/${hostConfig.context}` : ''
// npm run build --context
console.log(1123123,context)
if (process.env.PUBLIC_CONTEXT === 'true') {
  context = ''
} else if (process.env.PUBLIC_CONTEXT) {
// npm run build --context=qiqiao2/console
  context = `/${process.env.PUBLIC_CONTEXT}`
}
// 获取登录方式
// const validHostType = hostConfig && hostConfig.validHostType ? hostConfig.validHostType : 'zhongtai'
// const versionMode = hostConfig && hostConfig.versionMode ? hostConfig.versionMode : 'cloud'

// const runtimeEnv = hostConfig && hostConfig.runtimeEnv ? hostConfig.runtimeEnv : 'cloud'
// const disabledFunctions = hostConfig && hostConfig.disabledFunctions
// const customerName = hostConfig && hostConfig.customerName ? hostConfig.customerName : ''
// const blackList = hostConfig && hostConfig.blackList ? hostConfig.blackList : []

// const apiPath = process.env.NODE_ENV === 'production' ? `${context}/api/v1/` : '/api/' // api
// 基座apiPath
// const apiPath = process.env.NODE_ENV === 'production' ? `${context}/api/v1/` : '/v1/'

// 开发环境验证使用的token
const token = ''

// 公有云apiPath
const apiPath = `${context}/api/v1/`

/**
 * 二级域名
 */
const apiSlDomain = {
  default: '/'
}

module.exports = {
  apiPath,
  context
}
